package com.gmail.liulijuan;

public class SuanFa2 {

	public static void main(String[] args) {
		int n=12345;
		int m=n;
		int k=0;
		while (m>10) {
			m=m/10;
			k=k+1;
		}
		for (int i = k; i >= 0; i--) {
			m=(int) (n/Math.pow(10,i));
			n=n-(int) (m*Math.pow(10,i));
			System.out.printf("%1d",m);
		}
	}
}